import java.util.ArrayList;

import java.util.ArrayList;

/**
 * @author v.zhang
 * @Description
 * @crate 2024/11/26
 */
public class Department extends User{
    private ArrayList<Employee> employees;

    public Department(String name) {
        super(name);
        employees = new ArrayList<>();
    }

    public void addEmployee(Employee employee) {
        employees.add(employee);
    }
    @Override
    public void notify(Meeting meeting) {
        System.out.println("notify:" + name  +"+" + meeting.topic);
        for (Employee employee : employees) {
            employee.notify(meeting);
        }
    }
}
